package com.nai365.nart.order.feign;

import com.nai365.nart.common.core.constant.SecurityConstants;
import com.nai365.nart.common.core.constant.ServiceNameConstants;
import com.nai365.nart.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 商品系统
 * @author:  baogs
 * @Date: 2021/12/28 20:22
 */
@FeignClient(ServiceNameConstants.PRODUCT_SERVICE)
public interface ProductFeignService {

    /**
     * 根据skuId查询spu的信息
     * @param skuId
     * @return
     */
    @GetMapping(value = "/spuinfo/skuId/{skuId}")
	R getSpuInfoBySkuId(@PathVariable("skuId") Long skuId, @RequestHeader(SecurityConstants.FROM) String from);


	@GetMapping("/skuinfo/info/{skuId}")
	R getInfo(@PathVariable("skuId") Long skuId, @RequestHeader(SecurityConstants.FROM) String from);

}